/*
 *         Copyright (c) KUBOTA Corporation and HUDSON SOFT,
 *                  1994, 1995 All Rights Reserved
 *
 *  This software comprises unpublished confidential information of
 *  KUBOTA Corp. and HUDSON SOFT. It may not be used, copied or made 
 *  available to anyone, except in accordance with the license under
 *  which it is furnished.
 */
static char SccsId[] = "@(#)amdisp.c	1.5	9/19/95";
#include <farl.h>
#include <agl.h>

void
AGLDispObj(object* obj)
{
    int		i;
    unsigned short *p;

    printf("Geom.Top=0x%x ", obj->geometryTop);
    printf("Geom.Len=%d\n", obj->geometryLength);

    if (obj->material) {
	printf("Amb=0x%x ", obj->material->ambient);
	printf("Dif=0x%x ", obj->material->diffuse);
	printf("Spec=0x%x ", obj->material->specular);
	printf("rmat=0x%x 0x%x 0x%x 0x%x 0x%x\n",
	       obj->material->rmat[0], obj->material->rmat[1],
	       obj->material->rmat[2], obj->material->rmat[3],
	       obj->material->rmat[4]);
    } else
	printf("Material=NULL\n");
    printf("objChanged=%d\n", obj->objChanged);

    printf("objToWorld187[4][4]=\n");
    p = (unsigned short*) obj->objToWorld187;
    for (i = 0; i < 16; i++) {
	printf("0x%x ", *p++);
	if ((i + 1) % 4 == 0) printf("\n");
    }
    printf("objToWorld1015[3][3]=\n");
    p = (unsigned short*) obj->objToWorld1015;
    for (i = 0; i < 9; i++) {
	printf("0x%x ", *p++);
	if ((i + 1) % 3 == 0) printf("\n");
    }
    printf("objMatrix[4][4]=\n");
    p = (unsigned short*) obj->objMatrix;
    for (i = 0; i < 16; i++) {
	printf("0x%x ", *p++);
	if ((i + 1) % 4 == 0) printf("\n");
    }
    printf("nrmMatrix[3][3]=\n");
    p = (unsigned short*)obj->nrmMatrix;
    for (i = 0; i < 9; i++) {
	printf("0x%x ", *p++);
	if ((i + 1) % 3 == 0) printf("\n");
    }
}

void
AGLDispCamera()
{
    unsigned short *p;
    int		i;

    printf("camMatrix187[4][4]=\n");
    p = (unsigned short*) __AGLCamera.camMatrix187;
    for (i = 0; i < 16; i++) {
	printf("0x%x ", *p++);
	if ((i + 1) % 4 == 0) printf("\n");
    }
    printf("camMatrix1015[3][3]=\n");
    p = (unsigned short*)__AGLCamera.camMatrix1015;
    for (i = 0; i < 9; i++) {
	printf("0x%x ", *p++);
	if ((i + 1) % 3 == 0) printf("\n");
    }
    printf("camChanged=%d\n", __AGLCamera.camChanged);
}

void
AGLDispLight()
{
    printf("Light1Vect[3]=0x%x 0x%x 0x%x\n", __AGLLight[0].lightVector[0],
				__AGLLight[0].lightVector[1],
				__AGLLight[0].lightVector[2]);
    printf("light1Strength=%d ", __AGLLight[0].lightStrength);
    printf("light1Changed=%d\n", __AGLLight[0].lightChanged);

    printf("light2Vect[3]=0x%x 0x%x 0x%x\n", __AGLLight[1].lightVector[0],
				__AGLLight[1].lightVector[1],
				__AGLLight[1].lightVector[2]);
    printf("light2Strength=%d ", __AGLLight[1].lightStrength);
    printf("light2Changed=%d\n", __AGLLight[1].lightChanged);
}
